package com.shzq.test;

import java.time.Instant;
import java.time.format.DateTimeFormatter;

public class Demo {
    public static void main(String[] args) {
        Instant now = Instant.now();
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        String format = dateTimeFormatter.format(now);
        System.out.println(format);
    }

}
